home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / daemons / nfs / nfs-serv.2be / nfs-serv / nfs-server-2.2beta16 / rquota.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-06  |  1.0 KB  |  57 lines

  1. /*
  2.  * rquota.h        XDR and RPC stuff for the RPC quota service.
  3.  *
  4.  */
  5.  
  6. #ifndef RQUOTA_H
  7. #define RQUOTA_H
  8.  
  9. #define RQ_PATHLEN 1024
  10.  
  11. typedef struct getquota_args {
  12.     char *        gqa_pathp;
  13.     int        gqa_uid;
  14. } getquota_args;
  15.  
  16.  
  17. typedef struct rquota {
  18.     int        rq_bsize;
  19.     bool_t        rq_active;
  20.     u_int        rq_bhardlimit;
  21.     u_int        rq_bsoftlimit;
  22.     u_int        rq_curblocks;
  23.     u_int        rq_fhardlimit;
  24.     u_int        rq_fsoftlimit;
  25.     u_int        rq_curfiles;
  26.     u_int        rq_btimeleft;
  27.     u_int        rq_ftimeleft;
  28. } rquota;
  29.  
  30.  
  31. typedef enum gqr_status {
  32.     Q_OK        = 1,
  33.     Q_NOQUOTA    = 2,
  34.     Q_EPERM        = 3,
  35. } gqr_status;
  36.  
  37.  
  38. typedef struct getquota_rslt {
  39.     gqr_status status;
  40.     union {
  41.         rquota gqr_rquota;
  42.     } getquota_rslt_u;
  43. } getquota_rslt;
  44.  
  45.  
  46. #define RQUOTAPROG ((u_long)100011)
  47. #define RQUOTAVERS ((u_long)1)
  48. #define RQUOTAPROC_GETQUOTA ((u_long)1)
  49. #define RQUOTAPROC_GETACTIVEQUOTA ((u_long)2)
  50.  
  51. bool_t    xdr_getquota_args(XDR *, getquota_args *);
  52. bool_t    xdr_rquota(XDR *, rquota *);
  53. bool_t    xdr_gqr_status(XDR *, gqr_status *);
  54. bool_t    xdr_getquota_rslt(XDR *, getquota_rslt *);
  55.  
  56. #endif /* RQUOTA_H */
  57.